
import {axios,get,post} from "./ajax"

export const http =  {
    // 注册
    register:(body)=>post("/api/user",body), 

    // 查询当前用户是否存在  登录   phone
    checkPhone:(params)=>get("/api/user",params),

    // 发送验证码
    captchatsend:(params)=>get('http://47.104.209.44:3333/captcha/sent',params),

    // 校验验证码 
    captchatverify:(params)=>get('http://47.104.209.44:3333/captcha/verify',params),

    // 上传头像 
    avatarupload:(params,headers)=>post('http://47.104.209.44:3333/playlist/cover/update?id=3143833470',params,headers),

    // 卖座数据
    // getmaizuo:(params,headers)=>get('https://m.maizuo.com//gateway',params,headers)
    getmaizuo:(params,headers)=>get('/gateway',params,headers),

    postmaizuo:(params,headers)=>post('/gateway',params,headers),

    // 查询商品 
    getGoodList:(params)=>get("/api/good",params),

    // 查询商品详情 id  
    getGoodDetail:(id,params)=>get("/api/good/"+id,params),

}